import qreust from '@/utils/requst'
/**
 * 获取新闻详情
 * @param {number} 频道id
 * @param {number} 事件戳 请求新的推荐数据传当前的时间戳，请求历史推荐传指定的时间戳
 * @returns     Promise
 */
export const GetNewcApi = (channel_id) => {
  return qreust({
    url: `/v1_0/articles/${channel_id}`
  })
}
/**
 * 关注
 * @param {number} 用户id
 * @returns
 */
export const userGuanApi = (a) => {
  return qreust({
    url: '/v1_0/user/followings',
    method: 'POST',
    data: {
      target: a
    }
  })
}
/**
 * 取消关注
 * @param {number} 需要取消的用户id
 * @returns
 */
export const oidGuanApi = (target) => {
  return qreust({
    url: `/v1_0/user/followings/${target}`,
    method: 'DELETE'
  })
}
